CC=arm-apple-darwin-gcc
CFLAGS=-fsigned-char -Wall 
LDFLAGS= -lobjc -lsqlite3 -lcrypto -framework CoreFoundation \
         -framework Foundation -framework UIKit -framework LayerKit\
		 -framework CoreGraphics -framework GraphicsServices\
		 -framework OfficeImport -lpthread
		

all: Treasuremytext

Treasuremytext:	smsutils.o SmsUtilsApplication.o\
	MessageView.o Message.o Tmt.o TmtCategory.o
	$(CC) $(LDFLAGS) -o $@ $^
	rm -rf Treasuremytext.app
	cp -r Staging.app Treasuremytext.app
	rm -rf Treasuremytext.app/.svn
	cp -f Treasuremytext Treasuremytext.app

zip:  Treasuremytext
	zip -r Treasuremytext-`svn info |grep Revision | sed -e 's/[^0-9]//g' -e 's/^/r/'`.zip Treasuremytext.app
	

%.o:	%.c
	$(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@
%.o:	%.m
	$(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@


clean:
	rm -rf *.o Treasuremytext Treasuremytext.app Treasuremytext*.zip
